<?php   // $Id: fact_modif_acompte.php 207 2008-06-06 12:26:53Z pcoustillas $ ?>
<?php
/*Copyright (C) 2008 Pierre Coustillas
Licensed under the terms of the GNU  General Public License:http://www.opensource.org/licenses/gpl-license.php
File Authors: Pierre Coustillas*/

require_once("include/verif.php");

require_once("include/config/common.php");
require_once("include/config/var.php");
require_once("include/language/$lang.php");

$num_fact=isset($_POST['num_fact'])?$_POST['num_fact']:"";
$acompte=isset($_POST['acompte'])?$_POST['acompte']:0;

$acompte=str_replace(",",".",$acompte);
if ($acompte=="") 
{
	$acompte=0;
}


$sql_maj_fact="UPDATE ${tblpref}facture SET acompte=$acompte WHERE num=$num_fact";
mysql_query($sql_maj_fact) or die("Erreur SQL, mise à jour acompte facture !<br/>$sql_maj_fact<br/>" . mysql_error());
//echo $sql_maj_fact;

header("Location: fact_edit.php?num_fact=$num_fact");


